//
// Created by bobin on 17-6-13.
//

#include <string>
#include <sstream>
#include <vector>
#include "../src/ImgPathLoad.h"
#include "opencv2/core/core.hpp"

using namespace std;
const std::string filePath = "/home/bobin/data/calibrationn/stereo/select_cam/";
const std::string left_path = "/home/bobin/data/calibrationn/stereo/select_cam_sep/left/";
const std::string right_path = "/home/bobin/data/calibrationn/stereo/select_cam_sep/right/";
int main(int argc, char**argv)
{
    vector<string> imagelist;
    LoadImgNameFromPath(filePath, imagelist);
    for (int i = 0; i < imagelist.size(); ++i) {
        cv::Mat left,right;
        LoadImage(imagelist[i],left,right);
        stringstream rightName, leftName;
        leftName << left_path << i << ".jpg";
        rightName << right_path << i << ".jpg";

        cv::imwrite(leftName.str(),left);
        cv::imwrite(rightName.str(),right);
    }
}